package com.demo.consumer.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.demo.api.Demo;
import entity.User;
import org.springframework.stereotype.Component;

/**
 * @author DINGJIE
 * @version V1.0
 * @Description:
 * @date 2018/5/7 上午10:42
 */
@Component
public class DemoUse {
    @Reference(version = "1.0.0")
    Demo demo;

    public int add(int a, int b) {
        return demo.add(a, b);
    }

    public User getUserById(int id) {
        return demo.getUserById(id);
    }
}
